DB::table('users')->where(function ($query) use ($activated) { $query->where('activated', '=', $activated); })->get();